<template>
	<!-- 账户余额 -->
	<view>
		<uv-navbar title="账户余额" rightText="明细" @rightClick="rightClick" :autoBack="true"></uv-navbar>
		<view class="wrapper accountBalance-box">
			<view class="accountBalance accountBalance1">
				<view>
					<view class="name">分润账户</view>
					<view class="num">0.00</view>
					<view class="button">提现</view>
				</view>
				
			</view>
			<view class="accountBalance accountBalance2">
				<view class="name">返现账户</view>
				<view class="num">0.00</view>
				<view class="button">提现</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		created() {
			uni.hideTabBar({});
			this.initData();
		},
		// 下拉刷新
		async onPullDownRefresh() {
			// this.$store.dispatch('getUserDetail').then(async res => {
			// 	uni.stopPullDownRefresh();
			// 	await this.initData();
			// 	this.$tip.toast('刷新成功!', 'success', 500);
			// });
		},
		methods: {
			async initData() {
				await this.getData();
			},
			getData(){
				
			},
			rightClick(){
				this.$nav.push({
					path: '/pages/earnings/accountBalanceDetails'
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wrapper{
		padding: $uni-spacing-row-lg;
	}
	.accountBalance-box{
		margin-top: 50px;
		display: flex;
		justify-content: space-between;
		.accountBalance{
			padding: $uni-spacing-row-lg;
			width:  49%;
			overflow: hidden;
			border-radius: $uni-border-radius-xl;
			view{
				color: #fff;
				margin: 0 $uni-spacing-row-sm;
			}
			.name{
				margin-top: $uni-spacing-col-base;
				// font-size: $uni-font-size-lg;
			}
			.num{
				font-size: $uni-font-size-xxl;
				// font-weight: bold;
				padding: $uni-spacing-col-lg 0;
			}
			.button{
				border-radius: $uni-font-size-xxl;
				border:1px solid #fff;
				display: inline-block;
				padding: 5px 20px;
				margin:$uni-spacing-col-base $uni-spacing-row-sm;
			}
		}
		.accountBalance1{
			background: url('../../common/images/earnings/bg1.png') no-repeat;
			background-size: cover;
		}
		.accountBalance2{
			background: url('../../common/images/earnings/bg2.png') no-repeat;
			background-size: cover;
		}
	}
</style>